<%--
  Created by IntelliJ IDEA.
  User: jxw
  Date: 12-2-23
  Time: 上午9:07
  To change this template use File | Settings | File Templates.
--%>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<%@include file="../../../include/jsp/taglib.jsp"%>
<table id="wdsTable" class='datagrid2'>
    <tr>
        <th style="width:20px;"></th>
        <th style="width:30px;"><a href='javascript:myTable.checkAll()'>全选</a></th>
        <th>栏目id</th>
        <th>栏目名称</th>
        <th>父级栏目</th>
        <th style="width:30px;">状态</th>
    </tr>
    <c:forEach var="result" items="${model.data}" varStatus="s">
     <tr class="tableRow" oldClass="tableRow"
         onmouseover="if(this.className != 'tableRowSelected')this.className='tableRowOver';"
         onmouseout="if(this.className != 'tableRowSelected')this.className='tableRow'"
          onclick="RowSelect(this)"
          id="${result.ID}"
             >
         <td align="center" class="TableCellIndex">
             <c:out value="${s.index + 1}"/>
         </td>
         <td align="center">
             <input type='checkbox' name='options' value='<c:out value="${result.ID}"/>'>
         </td>
         <td>
            <c:out value="${result.ID}"/>
         </td>
         <td>
             <c:out value="${result.NAME}"/>
         </td>
         <td align="center">
             <c:out value="${result.PNAME}"/>
         </td>
         <td align="center">
             <c:if test="${result.STATUS == 1}">
                 <img src="<c:url value="/include/images/img/icon_true.gif"/>">
             </c:if>
             <c:if test="${result.STATUS == 0}">
                 <img src="<c:url value="/include/images/img/icon_false.gif"/>">
             </c:if>
         </td>

     </tr>
    </c:forEach>
</table>
<div style='width:98%;text-align:right;'>
     <a href="javascript:queryPage('0')">首页</a>
    <c:if test="${model.pages.CURPAGE<=0}">
        <a href="javascript:queryPage('0')">上一页</a>
    </c:if>
    <c:if test="${model.pages.CURPAGE>0}">
        <a href="javascript:queryPage('${model.pages.CURPAGE - 1}')">上一页</a>
    </c:if>
    <c:if test="${(model.pages.CURPAGE +1)>=model.pages.TOTALPAGE}">
        <a href="javascript:queryPage('${model.pages.TOTALPAGE - 1}')">下一页</a>
    </c:if>
    <c:if test="${(model.pages.CURPAGE+1)<model.pages.TOTALPAGE}">
        <a href="javascript:queryPage('${model.pages.CURPAGE + 1}')">下一页</a>
    </c:if>
     <a href="javascript:queryPage('${model.pages.TOTALPAGE - 1}')">尾页</a>

    共${model.pages.TOTALCOUNT}条记录
    第<fmt:formatNumber value="${(model.pages.CURPAGE * 1 + 1)/model.pages.TOTALPAGE}" pattern="0"/>页
    共${model.pages.TOTALPAGE}页
</div>